﻿using System;

namespace Codemonk.Common.Logging
{
    /// <summary>
    /// 通用的日志接口
    /// </summary>
    public interface ILog
    {
        /// <summary>
        /// 设置一个当前等级的消息
        /// </summary>
        /// <param name="level">等级</param>
        /// <param name="message">消息</param>
        void Record(LogLevel level, object message);
        /// <summary>
        /// 设置一个当前等级的消息,附带一个异常
        /// </summary>
        /// <param name="level">等级</param>
        /// <param name="message">消息 </param>
        /// <param name="exception">异常</param>
        void Record(LogLevel level, object message, Exception exception);
        /// <summary>
        /// 按照格式设置一个当前等级的消息
        /// </summary>
        /// <param name="level">等级</param>
        /// <param name="message">消息</param>
        /// <param name="format">格式</param>
        void Record(LogLevel level, object message, string format);
        /// <summary>
        /// 按照格式设置一个当前等级的消息
        /// </summary>
        /// <param name="level">等级</param>
        /// <param name="message">消息</param>
        /// <param name="format">格式</param>
        /// <param name="provider">格式处理器</param>
        void Record(LogLevel level, object message, string format, IFormatProvider provider);

    }

}
